﻿@{
    Layout = null;
}

<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    @Html.Partial("_Title")
    @Html.Raw(ViewBag.CssFile)
    <link href="~/Theme/plugins/Flexigrid/css/flexigrid.css" rel="stylesheet" />
</head>
<body class="fixed-top">
    @Html.Partial("_Top")
    <div id="container" class="row-fluid @ViewBag.MenuStatus">
        @Html.Partial("_LeftMenu")
        <div id="body">
            <div id="widget-config" class="modal hide">
                <div class="modal-header">
                    <button data-dismiss="modal" class="close" type="button"></button>
                    <h3>widget Settings</h3>
                </div>
                <div class="modal-body">
                    <p>Here will be a configuration form</p>
                </div>
            </div>
            <div class="container-fluid">
                <div class="row-fluid">
                    <div class="span12">
                        @Html.Raw(ViewBag.NavMenu)
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span12">
                        <div class="widget box light-grey">
                            <div class="widget-title">
                                <h4><i class="icon-globe"></i>用户管理</h4>
                                <div class="actions">
                                    <a class="btn btn-primary" href="javascript:void(0)" onclick="User.Add()"><i class="icon-pencil"></i>&nbsp;新增</a>
                                    <a class="btn btn-danger" href="javascript:void(0)" onclick="User.BatchDel()"><i class="icon-trash"></i>&nbsp;删除</a>
                                    <a class="btn btn-info" href="javascript:void(0)" onclick="User.ToExcel()"><i class="icon-download"></i>&nbsp;导出</a>
                                </div>
                            </div>
                            <div class="widget-body">
                                <div class="row-fluid">
                                    <form class="form-horizontal" action="javascript:void(0)">
                                        <div class="control-group">
                                            <div class="controls controls-cus">
                                                <input id="txtSearch" type="text" class="input-xlarge" placeholder="请输入用户名或者工号" />
                                                <a id="gritter-remove-all" class="btn btn-info" href="javascript:void(0)" onclick="User.PageClick(1)"><i class="icon-search"></i>&nbsp;搜索</a>
                                                <div class="btn-group">
                                                    <button id="btnHSearch" data-toggle="dropdown" class="btn btn-primary dropdown-toggle">高级搜索 <span class="caret"></span></button>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <div id="divHSearch" class="row-fluid hide">
                                    <div class="widget">
                                        <div class="widget-body form">
                                            <form class="horizontal-form" action="javascript:void(0)">
                                                <div class="row-fluid">
                                                    <div class="span2">
                                                        <div class="control-group">
                                                            <label for="firstName" class="control-label">员工编号</label>
                                                            <div class="controls">
                                                                <input id="txtUserCode" name="txtUserCode" type="text" class="span12" />
                                                                <span class="help-block"></span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="span2">
                                                        <div class="control-group">
                                                            <label for="firstName" class="control-label">员工姓名</label>
                                                            <div class="controls">
                                                                <input id="txtUserName" name="txtUserName" type="text" class="span12"/>
                                                                <span class="help-block"></span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="span2">
                                                        <div class="control-group">
                                                            <label for="firstName" class="control-label">部门</label>
                                                            <div class="controls">
                                                                <select id="ddlDepart" name="ddlDepart" class="input-medium">
                                                                    @Html.Raw(ViewBag.DepartList)
                                                                </select>   
                                                                <span class="help-block"></span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="span2">
                                                        <div class="control-group">
                                                            <label for="firstName" class="control-label">角色</label>
                                                            <div class="controls">
                                                                <select id="ddlRole" name="ddlRole" class="input-medium">
                                                                    @Html.Raw(ViewBag.RoleList)
                                                                </select>&nbsp;&nbsp;
                                                                <span class="help-block"></span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="span2">
                                                        <div class="control-group">
                                                            <label for="firstName" class="control-label">&nbsp;&nbsp;</label>
                                                            <a class="btn btn-info" href="javascript:void(0)" onclick="User.PageClick(1)"><i class="icon-search"></i>&nbsp;搜索</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>

                                <table class="table table-striped table-bordered table-hover" id="tabInfo">
                                    <thead>
                                        <tr class="widget-title">
                                            <th style="width: 8px;"><input type="checkbox" class="group-checkable" onclick="User.SelectAll(this)" /></th>
                                            <th class="hidden-480">用户名</th>
                                            <th class="hidden-480">编号</th>
                                            <th class="hidden-480">真名</th>
                                            <th class="hidden-480">Email</th>
                                            <th class="hidden-480">联系方式</th>
                                            <th class="hidden-480">登录次数</th>
                                            <th class="hidden-480">部门</th>
                                            <th class="hidden-480">角色</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                </table>

                                <div class="row-fluid" id="mypager">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @Html.Partial("_Foot")
    <script src="~/Theme/plugins/Flexigrid/js/flexigrid.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            User.SearchEvent();
            User.PageClick(1, 10);
        });
        $("#flexme1").flexigrid();
        //$("#tabInfo").flexigrid({
        //    url: 'post-xml.php',
        //    dataType: 'xml',
        //    colModel: [{
        //        display: 'ISO',
        //        name: 'iso',
        //        width: 40,
        //        sortable: true,
        //        align: 'center'
        //    }, {
        //        display: 'Name',
        //        name: 'name',
        //        width: 180,
        //        sortable: true,
        //        align: 'left'
        //    }, {
        //        display: 'Printable Name',
        //        name: 'printable_name',
        //        width: 120,
        //        sortable: true,
        //        align: 'left'
        //    }, {
        //        display: 'ISO3',
        //        name: 'iso3',
        //        width: 130,
        //        sortable: true,
        //        align: 'left',
        //        hide: true
        //    }, {
        //        display: 'Number Code',
        //        name: 'numcode',
        //        width: 80,
        //        sortable: true,
        //        align: 'right'
        //    }],
        //    buttons: [{
        //        name: 'Add',
        //        bclass: 'add',
        //        onpress: test
        //    }, {
        //        name: 'Delete',
        //        bclass: 'delete',
        //        onpress: test
        //    }, {
        //        separator: true
        //    }],
        //    searchitems: [{
        //        display: 'ISO',
        //        name: 'iso'
        //    }, {
        //        display: 'Name',
        //        name: 'name',
        //        isdefault: true
        //    }],
        //    sortname: "iso",
        //    sortorder: "asc",
        //    usepager: true,
        //    title: 'Countries',
        //    useRp: true,
        //    rp: 15,
        //    showTableToggleBtn: true,
        //    width: 700,
        //    height: 200
        //});

    </script>
</body>

</html>
